<template>
    <div class="addProduct2">
        <step-add :active='1'></step-add>
         <div>
            <van-cell-group style="text-align:left">
                <van-cell title="判定依据" value-class='van-ellipsis'  title-style='width:80px;' v-model="names" is-link  @click="toStandardInfo"/>
                <van-cell title="判定项目" v-model="test" is-link  @click="toStandardInfo"/>
                <van-cell title="检测标准" v-model="test" is-link  @click="toStandardInfo"/>
                <van-field v-model="test" label="科室情况汇总" />
                <van-field v-model="test" label="检测费用" />
                <van-field v-model="test" label="检测费用折扣" />
                <van-field v-model="test"  label-width='120px' label="检测费用实际金额" readonly/>
                <van-field v-model="test" label="附加费" />
            </van-cell-group>
         </div>
        <div class='step2Footer' >
            <div class='pre' @click="pre">上一步</div>
            <div class='next' @click="next">下一步</div>
        </div>
    </div>
</template>

<script>
import stepAdd from '@/components/stepAdd'
import { 
    Button
    ,DropdownMenu
    , DropdownItem
    ,Icon 
    ,Field
    ,DatetimePicker
    ,Popup
    ,Cell
    ,CellGroup
    ,Picker } from 'vant';
export default {
    name: 'addProduct2',
    components: {
        stepAdd,
        [Icon.name]:Icon,
        [Button.name]:Button,
        [DropdownMenu.name]:DropdownMenu,
        [DropdownItem.name]:DropdownItem,
        [Cell.name]:Cell,
        [CellGroup.name]:CellGroup,
        [Field.name]:Field,
        [DatetimePicker.name]:DatetimePicker,
        [Popup.name]:Popup,
        [Picker.name]:Picker,
    },
    data () {
        return {
            test:'ddd',
            names:'',
            ids:''
        }
    },
    created(){
        if(this.$route.query.ids){
            this.names = this.$route.query.names
            this.ids = this.$route.query.ids
        }
    },
    methods:{
        pre(){
            this.$router.push({path:"/addProduct1"});
        },
        next(){
            this.$router.push({path:"/addProduct3"});
        },
        toStandardInfo(){
            this.$router.push({path:"/standardInfo",query:{ids:this.ids,names:this.names}});
        },
    }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style>
.step2Footer{
    width:100%;
    height: 40px;
    line-height: 40px;
    position: fixed;
    bottom: 0;
    left:0;
    color: white;
    display: flex
}
.pre{
    background: #07c160;
    width: 50%;
}
.next{
    background:  #1989fa;
    width: 50%;
}
</style>
